
<%@ include file="../common.jsp" %>

<script type="text/javascript">
	$(document).ready(function(){
	setWorkFlowURL('<c:out value="${flowExecutionUrl}" />');
// 	setDocDetailURL('<c:out value="${flowExecutionUrl}" />');

	 createrejectDocDialog();
	 var errorCount = <c:out value="${documentWorkFlowForm.intErrorCount}"></c:out>;
/* 	 if(errorCount > 0){
		 openRejectDialog();	 
	 } */
	 setDialogDiv('rejectDocDiv');		 
	});
</script>

<div id="rejectDocDiv" title="Reject Document">
	<form:form commandName="documentWorkFlowForm" id="workFlowForm">
	<table class="zeroBorder formBlockColor tableTextFont">
			<tr class="formSpacingRow formBlockColor"><td></td> </tr>
		
		<tr>
			<td class="spacingColumnWidthLess"></td>
			<td class="formLabel"><label>Remarks</label> </td>
			<td class="spacingColumnWidthLess"></td>
			<td>
				<input type="hidden" value="${currentWfId}" name="currentWfId" id="currentWfId">
				<input type="hidden" value="${docId}" name="docId" id="docId">
				<form:textarea path="remarks" id="remarks" /> 
			</td>
		</tr>
	<tr class="formSpacingRow formBlockColor"><td></td> </tr>
	<tr class="formSpacingRow formBlockColor"><td></td> </tr>
		<tr>	
			<td class="spacingColumnWidthLess"></td>
			<td colspan="3" align="center">
				<input type="button" class="formButton" value="Reject" onclick="approveOrRejectDocument('workFlowForm','reject')">	
				&nbsp;<input type="button" class="formButton" value="Cancel" onclick="closeCurrentDialog()">					
			</td>
	
		</tr>
		<tr>
			<td class="spacingColumn"></td>
			<td colspan="3">
				<form:errors path="remarks" cssClass="text errorMsg"></form:errors>
			</td>
		</tr>
	<tr class="formSpacingRow formBlockColor"><td></td> </tr>
	</table>
	</form:form>	
</div>